﻿using System.Windows;
using GalaSoft.MvvmLight.Messaging;
using WhiteRepositoryExplorer.Messeges;

namespace WhiteRepositoryExplorer.Views
{
    /// <summary>
    /// Interaction logic for AboutWindow.xaml
    /// </summary>
    public partial class AboutWindow : Window
    {
        public AboutWindow()
        {
            InitializeComponent();
        }

        public AboutWindow(Window owner)
        {
            InitializeComponent();
            Owner = owner;

            Closing += (s, e) => 
            {
                // window reused so just hide
                e.Cancel = true;
                Messenger.Default.Send(new HideAboutWindowMessage());
            };
        }
    }
}
